<html>
	<head>
			<link rel="stylesheet" type="text/css" href="style.css"/>
		<script type="text/javascript" src="jquery.js"></script>
		<script type="text/javascript">
			function dodajDoObliczen (v) {
				var input = $('#nazwa');
				input.val(input.val() + '' + v);
				input.focus();
 			}
 			
 			function oblicz() {
				var input = $('#nazwa');
				input.val(eval(input.val()));
				input.focus();
			}
			
			
		</script>

	</head>
	<body>
		
		<h1>KALKULATOR</h1>
		
		<div style="width: 300px; margin-left: 435px; text-align: center">
			
				<input type="text" id="nazwa" name="pole" align="center"> 
			
			<table align="center">
				<tr>
					<td><button onclick="dodajDoObliczen(1)" id="a1" value="1" class="nr">1</button></td>
					
					<td><button onclick="dodajDoObliczen(2)" id="a2" value="2" class="nr">2</button></td>
					
					<td><button onclick="dodajDoObliczen(3)" id="a3" value="3" class="nr">3</button></td>
					
					<td><button onclick="$('#nazwa').val('')" id="delete" class="act">C</button></td>
					
					<td><button onclick="dodajDoObliczen('+')" id="ap" value="+" class="act">+</button></td>
					
					

				</tr>
			
				<tr>
					<td><button onclick="dodajDoObliczen(4)" id="a4" value="4" class="nr">4</button></td>
					
					<td><button onclick="dodajDoObliczen(5)" id="a5" value="5" class="nr">5</button></td>
					
					<td><button onclick="dodajDoObliczen(6)" id="a6" value="6" class="nr">6</button></td>
					<td ><button  onclick="dodajDoObliczen('-')" id="am" value="-" class="act">-</button></td>

					
				</tr>
			
			
				<tr>
					<td><button onclick="dodajDoObliczen(7)" id="a7" value="7" class="nr">7</button></td>
					
					<td><button onclick="dodajDoObliczen(8)" id="a8" value="8" class='nr'>8</button></td>
					
					<td><button onclick="dodajDoObliczen(9)" id="a9" value="9" class='nr'>9</button></td>
					<td><button onclick="dodajDoObliczen('*')" id="apomnoz" value="*" class='act'>*</button></td>

				</tr>

				<tr>
					<td><button onclick="dodajDoObliczen(0)" id="a0" value="0" class='nr'>0</button></td>
					<td colspan="2"><button onclick="oblicz()" id="ar" class='act'>=</button></td>
					
					
					
					
					<td><button onclick="dodajDoObliczen('/')" id="apodziel" value="/" class='act'>/</button></td>
					
					<td><button onclick="dodajDoObliczen('.')" id="adot" value="." class='act'>.</button></td>





				</tr>
	
			</table>
		</div>
	</body>
</html>



<?PHP
	

?>
<p>$(document).ready(function() {
				
				$('#nazwa').focus().bind('keyup', function() { alert(arguments[0]) } );
			});
			</p>
